//
//  MOTAutoSizeLabel.h
//  MOTAutoSizeLabel
//
//  Created by 怪兽K on 16/8/24.
//  Copyright © 2016年 jiyun. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol MOTAutoSizeLabelDelegate <NSObject>

@optional
-(void)changeWidth:(CGFloat) width;
-(void)changeHeight:(CGFloat) height;

@end

@interface MOTAutoSizeLabel : UIView

@property (assign, nonatomic) id<MOTAutoSizeLabelDelegate> delegate;

@property (nonatomic, copy) NSString *text;

@property (nonatomic, strong) UIFont *font;
@property (nonatomic, strong) UIColor *textColor;

@property (nonatomic, assign, readonly) CGFloat textWidth;//文字宽度
@property (nonatomic, assign, readonly) CGFloat textHeight;//文字高度

@property (nonatomic, assign) UIEdgeInsets textInset;

@property (nonatomic, assign) BOOL isAutoWidth;//是否根据文字自动计算label的宽
@property (nonatomic, assign) BOOL isAutoHeight;//是否根据文字自动计算label的高

@end
